package com.wangp.mywrite.s_juc.concurrtent_tools;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @author tooStronger
 * @date 2023/5/28
 */
public class CollectionSyncTest {

    public static void main(String[] args) {
        ArrayList<String> unSyncList = new ArrayList<>();
        List<String> list = Collections.synchronizedList(unSyncList);
        list.add("args");
        System.out.println(list.get(0));
    }
}
